package com.coder.books.thinkinjava;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 *
 * @author yuhushuan
 * @date 2020/7/29 17:57
 */
public class Test {
    public static void main(String[] args) {
        Lock lock = new ReentrantLock();
        Condition condition = lock.newCondition();
        Thread t = new Thread(){
            @Override
            public void run() {
                System.out.println(Thread.interrupted());
                System.out.println(Thread.interrupted());
                System.out.println(Thread.interrupted());
            }
        };
        t.start();
        t.interrupt();
    }
}


